package com.hospital.wx.dao;

import com.hospital.wx.pojo.Likes;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface LikesDao {
    List<Integer> getUserLikedIds(
            @Param("patientUserId") Integer patientUserId,
            @Param("targetType") String targetType);

    long countLikes(@Param("targetId") Integer targetId,
                    @Param("targetType") String targetType);

    int addLikes(Likes likes);

    int cancelLikes(Integer id);

    Integer selectId(Map param);

    int deleteLike(Map param);

    int deleteLikesByTargetId(Integer replyId);

    int deleteByParentId(Integer replyId);
}